#ifndef __C_ACTION_ELLIPSE_H__
#define __C_ACTION_ELLIPSE_H__
#include "common.h"

typedef struct _ActionEllipseConfig {
	CCPoint centerPosition;
	float aLength;
	float bLength;
} ActionEllipseConfig;

class CActionEllipse : public CCActionInterval
{
public:
	static CActionEllipse* create(float duration, ActionEllipseConfig c);
	static CActionEllipse* actionWithDuration(float duration, ActionEllipseConfig c);

public:
	bool initWithDuration(float duration, ActionEllipseConfig c);
	virtual CCObject* copyWithZone(CCZone* pZone);
	virtual void startWithTarget(CCNode *pTarget);
	virtual void update(float time);

protected:
	ActionEllipseConfig m_sConfig;
	CCPoint m_startPosition;
	CCPoint s_startPosition;
};

#endif  // __C_ACTION_ELLIPSE_H__